﻿<UserControl xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"  x:Class="QWeiBoN.UserControler.ReferenceUserControler"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Popup x:Name="UserListPopUp" IsOpen="False" HorizontalOffset="0" VerticalOffset="0">
        <Grid x:Name="UserListGrid" Style="{StaticResource ReferenceUserLayoutGrid}">
            <StackPanel>
                <toolkit:PerformanceProgressBar x:Name="progressbar" IsIndeterminate="False" Width="400" HorizontalContentAlignment="Center" Style="{StaticResource PerformanceProgressBarStyle}" />
                <TextBlock Text="@ta" Style="{StaticResource ReferenceUserTitleStyle}" />
                <StackPanel Orientation="Horizontal">
                    <TextBox x:Name="UserKeyword" Style="{StaticResource ReferenceUserTextboxStyle}" GotFocus="UserKeyword_GotFocus" LostFocus="UserKeyword_LostFocus" />
                    <Button x:Name="SearchButton" Content="查找" Click="SearchButton_Click" Style="{StaticResource ReferenceUserSearchButtonStyle}" />
                </StackPanel>
                <ListBox x:Name="UserList" Margin="12,0,0,80" Background="Transparent" Grid.ColumnSpan="2" Tap="UserList_Tap">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,12" Background="Transparent">
                                <Image x:Name="UserHead" Source="{Binding Head}" Stretch="Fill" Width="30" Height="30" Margin="0,0,6,0" />
                                <TextBlock Text="{Binding Nick}" Style="{StaticResource ReferenceUserNickNameStyle}" />
                                <TextBlock Text="{Binding Name, StringFormat='(\{0\})'}" Style="{StaticResource ReferenceUserNameStyle}" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </StackPanel>
        </Grid>
    </Popup>
</UserControl>
